package cn.community.system.mapper;

import cn.community.system.query.QueryObject;
import cn.community.system.domain.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Admin admin);

    Admin selectByPrimaryKey(Long id);

    List<Admin> selectAll();

    int updateByPrimaryKey(Admin admin);

    List<Admin> selectForList(QueryObject qo);

    Admin selectByName(String username);

    Admin selectByNameAndPassword(@Param("userName")String userName, @Param("password")String password);

    void insertRelation(@Param("aid") Long aid, @Param("rid") Long rid);

    void deleteRelation(Long id);

    void deleteBatch(Long[] ids);
}
